from django.db import models
from sprt.schedule.models import Schedule
from django.contrib.auth.models import User

# Create your models here.

class Approve(models.Model):
    id = models.AutoField(primary_key=True)
    content = models.CharField(max_length=4000)
    schedule = models.ForeignKey(Schedule)
    created_by = models.ForeignKey(User)
    status = models.SmallIntegerField(default=0)
    commit_date = models.DateTimeField(null=True)
    created_date = models.DateTimeField(auto_now_add=True)
    
    class Meta:
        db_table = "APPROVE"
        
class Unapprove(models.Model):
    approve_id = models.IntegerField(null=True)
    status = models.SmallIntegerField(null=True,default=0)
    schedule_id = models.IntegerField(primary_key=True)
    schedule_start_date=models.DateTimeField()
    schedule_title=models.CharField(max_length=100)
    schedule_keyword=models.CharField(max_length=30)
    schedule_end_date=models.DateTimeField()
    schedule_type_name=models.CharField(max_length=10)
    schedule_created_by = models.IntegerField()
    schedule_created_by_info = models.CharField(max_length=30)
    
    class Meta:
        managed=False    
    